package com.mtons.mblog.modules.rabbitmq;

import java.io.Serializable;

/**
 * @className: PostUpdateMessage
 * @auther: Jerry
 * @date: 2021/4/6 14:31
 * @desctiption: TODO
 * @version: 1.0
 */
public class PostUpdateMessage implements Serializable {

    private static final long serialVersionUID = -3079214010806287956L;

    //    // 草稿
//    public final static String POST_DRAFT = "draft";
    // 发布
    public final static String POST_PUBLISH = "publish";
    // 删除
    public final static String POST_DELETE = "delete";

    /**
     * 文章操作类型
     */
    private String action;

    /**
     * 用户id
     */
    private long userId;

    /**
     * 相关文章Id
     */
    private long postId;

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getPostId() {
        return postId;
    }

    public void setPostId(long postId) {
        this.postId = postId;
    }

    public PostUpdateMessage(long userId, long postId, String action) {
        this.userId = userId;
        this.postId = postId;
        this.action = action;
    }

}
